<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function fanzhuan(arr) {
            var arr1 = [];
            for (var i = arr.length - 1; i >= 0; i--) {
                arr1[arr.length - i - 1] = arr[i];
            }
            return arr1;
        }
        var a = [1, 2, 3, 4, 5, 6];
        console.log(fanzhuan(a));
    </script>
</head>

<body>

</body>

</html>